import {createRouter, createWebHistory} from 'vue-router';

import Path from '@/router/router/path.js';
import Alias from '@/router/router/alias.js';
import Redirect from '@/router/router/redirect.js';
import Children from '@/router/router/children.js';
import Name from '@/router/router/name.js';
import Components from '@/router/router/components.js';
import Props from '@/router/router/props.js';
import Meta from '@/router/router/meta.js';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 动态路由
    ...Path,
    
    // 别名
    ...Alias,
    
    // 重定向
    ...Redirect,
    
    // 嵌套路由
    ...Children,
    
    // 命名路由
    ...Name,
    
    // 命名视图
    ...Components,
    
    // 传参
    ...Props,
    
    // 元信息
    ...Meta,
  ]
});

export default router;
